package com.aos.iot.socket.tcp.runner;

import com.aos.iot.socket.tcp.SocketTcpServer;
import lombok.RequiredArgsConstructor;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;

@RequiredArgsConstructor
public class SocketTcpRunner implements ApplicationRunner {

    private final SocketTcpServer socketTcpServer;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        socketTcpServer.start();
    }

    public void stop() {
        socketTcpServer.stop();
    }
}
